//多重继承的构造函数
#include <iostream>
#include <cstring>
using namespace std;

//车
class Car
{
    int x;
public:
    Car(int x=0):x(x){}
    void show(){cout << "x=" << x << endl;}
};

//船
class Boat
{
    float y;
public:
    Boat(float y=0.0):y(y){}
    void show(){cout << "y=" << y << endl;}
};

//两栖车
class AmphibiousVehicle : public Car,public Boat
{
public:
    AmphibiousVehicle(int x=0,float y=0.0);
};
AmphibiousVehicle ::AmphibiousVehicle(int x,float y)
    :Car(x),Boat(y)
{
    //
}

int main(int argc, char const *argv[])
{
    AmphibiousVehicle a1;
    a1.Car::show();
    a1.Boat::show();

    AmphibiousVehicle a2(2,3.4);
    a2.Car::show();
    a2.Boat::show();

    return 0;
}

